package book.dao.impl;

import book.entity.Book;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by Administrator on 2017/3/30/030.
 */
public class BookRowMap implements RowMapper<Book> {
    @Override
    public Book mapRow(ResultSet resultSet, int i) throws SQLException {
        Book book=new Book();
        book.setbName(resultSet.getString("bname"));
        book.setbId(resultSet.getInt("bid"));
        book.setbPrice(resultSet.getDouble("bprice"));
        return book;
    }
}
